import request from '@/utils/request'
export function getExamList(data) {
    // 获取试卷列表
    return request({
        url: '/exam-paper/getPageList',
        // url: '/exam-paper-manager/getPageList',

        method: 'post',
        data
    })
}
export function getPublishHistoryList(data) {
    // 获取历史列表
    return request({
        url: '/exam-paper-manager/getPageList',
        method: 'post',
        data
    })
}

export function getTaskPublishList(data) {
    // 获取任务试卷
    return request({
        url: '/exam-paper/publishExamPage',
        method: 'post',
        data
    })
}
export function saveOrUpdateExam(data) {
    // 添加或更新试卷
    return request({
        url: '/exam-paper/saveOrUpdate',
        method: 'post',
        data
    })
}

export function examDetail(data) {
    // 试卷详情
    return request({
        url: `/exam-paper/select/${data.id}`,
        method: 'post'
    })
}

export function deleteExam(data) {
    // 删除试卷
    return request({
        url: '/exam-paper/delete',
        method: 'post',
        data
    })
}

export function publishExamPaper(data) {
    // 发布试卷
    return request({
        url: '/exam-paper-manager/publish',
        method: 'post',
        data
    })
}

export function unPublishExamPaper(id) {
    // 取消发布试卷
    return request({
        url: `/exam-paper-manager/unPublish/${id}`,
        method: 'post'
    })
}